package models;

import play.db.jpa.Model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Bergur
 * Date: 23.2.2012
 * Time: 21:25
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class News  extends Model {
    public String title;
    public String text;
    public Date posted;

    @ManyToOne
    public Client author;

    public News(String title, String text, Date posted, Client client) {
        this.title = title;
        this.text = text;
        this.posted = posted;
        this.author = client;
    }
}
